﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using IHISCETeim.Library;
using System.Data.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using IHISCETeim.Model;
namespace IHISCETeim.DAL
{
    public class SBOMChangeOITMDAL
    {
        /// <summary>
        /// 获取未发送
        /// </summary>
        /// <returns></returns>
        public static DataTable GetAll()
	    {
		    Database DB = DatabaseFactory.CreateDatabase();		
		
            DbCommand dbCommand = DB.GetStoredProcCommand("SBOMChangeOITM_GetAll");
            return DB.ExecuteDataSet(dbCommand).Tables[0];
	    }
        /// <summary>
        /// 已发送
        /// </summary>
        /// <param name="ID"></param>
        public static void Send(int ID)
        {
            Database DB = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = DB.GetStoredProcCommand("SBOMChangeOITM_Send",ID);
            DB.ExecuteNonQuery(dbCommand);
        }
    }
}
